import numpy as np

array = np.random.randint(low=1, high=1000, size=10)

print(array)


def insert_sort(a: list) -> object:
    i = 1
    while i < len(a):
        if a[i] < a[i - 1]:
            j = i - 1
            x = a[i]
            while j >= 0 and x < a[j]:
                a[j + 1] = a[j]
                j -= 1
            a[j + 1] = x
        i += 1
    return a


insert_sort(array)

print(array)
